/**
 * 
 */
package io.dora.demo;

import io.dora.conf.ConsumerConfig;
import io.dora.conf.ProtocolConfig;
import io.dora.conf.RegistryConfig;

/**
 * @author zhaohongbo
 *
 */
public class DemoAPIConsmer {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ProtocolConfig protocolConfig = new ProtocolConfig();
		protocolConfig.setName("");
		RegistryConfig registryConfig = new RegistryConfig();
		registryConfig.setUrl("127.0.0.1:2181");
		ConsumerConfig<HelloRpc> consumerConfig = new ConsumerConfig<HelloRpc>();
		consumerConfig.setRegistry(registryConfig.getRegistry());
		consumerConfig.setInterfaceClass(HelloRpc.class);
		consumerConfig.setGroup("jshop_test");
		consumerConfig.setProtocol(protocolConfig.getProtocol());
		
		
		HelloRpc helloRpc = (HelloRpc) consumerConfig.refer();
		
		System.out.println(helloRpc.echoHello("zhaosizhe"));
	}

}
